package com.yjhb.android.sbz.entity;

import com.google.gson.Gson;
import com.jojo.android.zxlib.base.BaseEntity;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.Date;

/**
 * 创建者 zx
 * 创建时间 2020/11/19 9:49
 */
public class Follow extends BaseEntity {

    private Date followTime; //关注的时间
    private Date subscribeTime; //粉丝的时间
    private String avatar;
    private int userId;
    private String nickName;

    public static Follow objectFromData(String str) {

        return new Gson().fromJson(str, Follow.class);
    }

    public static Follow objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), Follow.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public Date getFollowTime() {
        return followTime;
    }

    public void setFollowTime(Date followTime) {
        this.followTime = followTime;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public void setSubscribeTime(Date subscribeTime) {
        this.subscribeTime = subscribeTime;
    }

    public Date getSubscribeTime() {
        return subscribeTime;
    }
}
